using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._ServerTools._Printing
{
    /// <summary>
    /// <para>Export Web Map</para>
    /// <para>Takes the state of a web app (for example, included services, layer visibility settings, and client-side graphics) and returns a printable page layout or basic map of the specified area of interest.</para>
    /// <para>获取 Web 应用程序的状态（例如，包含的服务、图层可见性设置和客户端图形），并返回指定感兴趣区域的可打印页面布局或基本地图。</para>
    /// </summary>    
    [DisplayName("Export Web Map")]
    public class ExportWebMap : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ExportWebMap()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_Web_Map_as_JSON">
        /// <para>Web Map as JSON</para>
        /// <para>A JSON representation of the state of the map to be exported as it appears in the web app. See the ExportWebMap specification to understand how to format this text. The ArcGIS web APIs for JavaScript, Flex, Silverlight, and so on allow you to get this JSON string from the map.</para>
        /// <para>要导出的地图状态的 JSON 表示形式，因为它在 Web 应用程序中显示。请参阅 ExportWebMap 规范以了解如何设置此文本的格式。适用于 JavaScript、Flex、Silverlight 等的 ArcGIS Web API 允许您从地图中获取此 JSON 字符串。</para>
        /// </param>
        /// <param name="_Output_File">
        /// <para>Output File</para>
        /// <para>The output file name. The extension of the file depends on the Format parameter value.</para>
        /// <para>输出文件名。文件的扩展名取决于 Format 参数值。</para>
        /// </param>
        public ExportWebMap(object _Web_Map_as_JSON, object _Output_File)
        {
            this._Web_Map_as_JSON = _Web_Map_as_JSON;
            this._Output_File = _Output_File;
        }
        public override string ToolboxName => "Server Tools";

        public override string ToolName => "Export Web Map";

        public override string CallName => "server.ExportWebMap";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_Web_Map_as_JSON, _Output_File, _Format.GetGPValue(), _Layout_Templates_Folder, _Layout_Template];

        /// <summary>
        /// <para>Web Map as JSON</para>
        /// <para>A JSON representation of the state of the map to be exported as it appears in the web app. See the ExportWebMap specification to understand how to format this text. The ArcGIS web APIs for JavaScript, Flex, Silverlight, and so on allow you to get this JSON string from the map.</para>
        /// <para>要导出的地图状态的 JSON 表示形式，因为它在 Web 应用程序中显示。请参阅 ExportWebMap 规范以了解如何设置此文本的格式。适用于 JavaScript、Flex、Silverlight 等的 ArcGIS Web API 允许您从地图中获取此 JSON 字符串。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Web Map as JSON")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _Web_Map_as_JSON { get; set; }


        /// <summary>
        /// <para>Output File</para>
        /// <para>The output file name. The extension of the file depends on the Format parameter value.</para>
        /// <para>输出文件名。文件的扩展名取决于 Format 参数值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output File")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _Output_File { get; set; }


        /// <summary>
        /// <para>Format</para>
        /// <para><xdoc>
        ///   <para>Specifies the format in which the map image for printing will be delivered.</para>
        ///   <bulletList>
        ///     <bullet_item>8-bit Portable Network Graphics (PNG8)—8-bit Portable Network Graphics (PNG8) will be used. This is the default.</bullet_item><para/>
        ///     <bullet_item>Portable Document Format (PDF)—Portable Document Format (PDF) will be used.</bullet_item><para/>
        ///     <bullet_item>32-bit Portable Network Graphics (PNG32)—32-bit Portable Network Graphics (PNG32) will be used.</bullet_item><para/>
        ///     <bullet_item>Joint Photographic Experts Group (JPG)— Joint Photographic Experts Group (JPG) will be used.</bullet_item><para/>
        ///     <bullet_item>Graphics Interchange Format (GIF)— Graphics Interchange Format (GIF) will be used.</bullet_item><para/>
        ///     <bullet_item>Encapsulated PostScript (EPS)— Encapsulated PostScript (EPS) will be used.</bullet_item><para/>
        ///     <bullet_item>Scalable Vector Graphics (SVG)—Scalable Vector Graphics (SVG) will be used.</bullet_item><para/>
        ///     <bullet_item>Compressed Scalable Vector Graphics (SVGZ)—Compressed Scalable Vector Graphics (SVGZ) will be used.</bullet_item><para/>
        ///     <bullet_item>Adobe Illustrator Exchange (AIX)—Adobe Illustrator Exchange (AIX) will be used.</bullet_item><para/>
        ///     <bullet_item>Tag Image File Format (TIFF)—Tag Image File Format (TIFF) will be used.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>The background of the output file is always opaque.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定用于打印的地图图像的传送格式。</para>
        ///   <bulletList>
        ///     <bullet_item>8 位可移植网络图形 （PNG8）—将使用 8 位可移植网络图形 （PNG8）。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>可移植文档格式 （PDF） - 将使用可移植文档格式 （PDF）。</bullet_item><para/>
        ///     <bullet_item>32 位可移植网络图形 （PNG32） —将使用 32 位可移植网络图形 （PNG32）。</bullet_item><para/>
        ///     <bullet_item>联合图像专家组 （JPG）— 将使用联合图像专家组 （JPG）。</bullet_item><para/>
        ///     <bullet_item>图形交换格式 （GIF）— 将使用图形交换格式 （GIF）。</bullet_item><para/>
        ///     <bullet_item>封装的 PostScript （EPS）— 将使用封装的 PostScript （EPS）。</bullet_item><para/>
        ///     <bullet_item>可缩放矢量图形 （SVG） - 将使用可缩放矢量图形 （SVG）。</bullet_item><para/>
        ///     <bullet_item>压缩可缩放矢量图形 （SVGZ）—将使用压缩可缩放矢量图形 （SVGZ）。</bullet_item><para/>
        ///     <bullet_item>Adobe Illustrator Exchange （AIX） - 将使用 Adobe Illustrator Exchange （AIX）。</bullet_item><para/>
        ///     <bullet_item>标记图像文件格式 （TIFF） - 将使用标记图像文件格式 （TIFF）。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>输出文件的背景始终是不透明的。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Format")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _Format_value _Format { get; set; } = _Format_value._PDF;

        public enum _Format_value
        {
            /// <summary>
            /// <para>Portable Document Format (PDF)</para>
            /// <para>Portable Document Format (PDF)—Portable Document Format (PDF) will be used.</para>
            /// <para>可移植文档格式 （PDF） - 将使用可移植文档格式 （PDF）。</para>
            /// </summary>
            [Description("Portable Document Format (PDF)")]
            [GPEnumValue("PDF")]
            _PDF,

            /// <summary>
            /// <para>32-bit Portable Network Graphics (PNG32)</para>
            /// <para>32-bit Portable Network Graphics (PNG32)—32-bit Portable Network Graphics (PNG32) will be used.</para>
            /// <para>32 位可移植网络图形 （PNG32） —将使用 32 位可移植网络图形 （PNG32）。</para>
            /// </summary>
            [Description("32-bit Portable Network Graphics (PNG32)")]
            [GPEnumValue("PNG32")]
            _PNG32,

            /// <summary>
            /// <para>8-bit Portable Network Graphics (PNG8)</para>
            /// <para>8-bit Portable Network Graphics (PNG8)—8-bit Portable Network Graphics (PNG8) will be used. This is the default.</para>
            /// <para>8 位可移植网络图形 （PNG8）—将使用 8 位可移植网络图形 （PNG8）。这是默认设置。</para>
            /// </summary>
            [Description("8-bit Portable Network Graphics (PNG8)")]
            [GPEnumValue("PNG8")]
            _PNG8,

            /// <summary>
            /// <para>Joint Photographic Experts Group (JPG)</para>
            /// <para>Joint Photographic Experts Group (JPG)— Joint Photographic Experts Group (JPG) will be used.</para>
            /// <para>联合图像专家组 （JPG）— 将使用联合图像专家组 （JPG）。</para>
            /// </summary>
            [Description("Joint Photographic Experts Group (JPG)")]
            [GPEnumValue("JPG")]
            _JPG,

            /// <summary>
            /// <para>Graphics Interchange Format (GIF)</para>
            /// <para>Graphics Interchange Format (GIF)— Graphics Interchange Format (GIF) will be used.</para>
            /// <para>图形交换格式 （GIF）— 将使用图形交换格式 （GIF）。</para>
            /// </summary>
            [Description("Graphics Interchange Format (GIF)")]
            [GPEnumValue("GIF")]
            _GIF,

            /// <summary>
            /// <para>Encapsulated PostScript (EPS)</para>
            /// <para>Encapsulated PostScript (EPS)— Encapsulated PostScript (EPS) will be used.</para>
            /// <para>封装的 PostScript （EPS）— 将使用封装的 PostScript （EPS）。</para>
            /// </summary>
            [Description("Encapsulated PostScript (EPS)")]
            [GPEnumValue("EPS")]
            _EPS,

            /// <summary>
            /// <para>Scalable Vector Graphics (SVG)</para>
            /// <para>Scalable Vector Graphics (SVG)—Scalable Vector Graphics (SVG) will be used.</para>
            /// <para>可缩放矢量图形 （SVG） - 将使用可缩放矢量图形 （SVG）。</para>
            /// </summary>
            [Description("Scalable Vector Graphics (SVG)")]
            [GPEnumValue("SVG")]
            _SVG,

            /// <summary>
            /// <para>Compressed Scalable Vector Graphics (SVGZ)</para>
            /// <para>Compressed Scalable Vector Graphics (SVGZ)—Compressed Scalable Vector Graphics (SVGZ) will be used.</para>
            /// <para>压缩可缩放矢量图形 （SVGZ）—将使用压缩可缩放矢量图形 （SVGZ）。</para>
            /// </summary>
            [Description("Compressed Scalable Vector Graphics (SVGZ)")]
            [GPEnumValue("SVGZ")]
            _SVGZ,

            /// <summary>
            /// <para>Adobe Illustrator Exchange (AIX)</para>
            /// <para>Adobe Illustrator Exchange (AIX)—Adobe Illustrator Exchange (AIX) will be used.</para>
            /// <para>Adobe Illustrator Exchange （AIX） - 将使用 Adobe Illustrator Exchange （AIX）。</para>
            /// </summary>
            [Description("Adobe Illustrator Exchange (AIX)")]
            [GPEnumValue("AIX")]
            _AIX,

            /// <summary>
            /// <para>Tag Image File Format (TIFF)</para>
            /// <para>Tag Image File Format (TIFF)—Tag Image File Format (TIFF) will be used.</para>
            /// <para>标记图像文件格式 （TIFF） - 将使用标记图像文件格式 （TIFF）。</para>
            /// </summary>
            [Description("Tag Image File Format (TIFF)")]
            [GPEnumValue("TIFF")]
            _TIFF,

        }

        /// <summary>
        /// <para>Layout Templates Folder</para>
        /// <para>The full path to the folder containing layout pages (.pagx files ) to be used as layout templates. The default location is <install_directory>\Resources\ArcToolBox\Templates\ExportWebMapTemplates.</para>
        /// <para>包含要用作布局模板的布局页（.pagx 文件）的文件夹的完整路径。默认位置为 <install_directory>\Resources\ArcToolBox\Templates\ExportWebMapTemplates。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Layout Templates Folder")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _Layout_Templates_Folder { get; set; } = null;


        /// <summary>
        /// <para>Layout Template</para>
        /// <para>The name of a template from the list or the keyword MAP_ONLY. When MAP_ONLY is chosen or an empty string is passed in, the output map will not contain any page layout elements such as title, legend, or scale bar.</para>
        /// <para>列表中的模板名称或关键字MAP_ONLY。选择MAP_ONLY或传入空字符串时，输出地图将不包含任何页面布局元素，例如标题、图例或比例尺。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Layout Template")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _Layout_Template { get; set; } = null;


        public ExportWebMap SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}